<?php

$section = 'category';

$titre = _LB_CHANNEL_EDIT;
$smarty->assign('titre', $titre);

$id = Request::getIntNumber('id');
$backlink = Session::getBackLink('category');
$currentlink = APPLICATION_URL . "/category/delete/?id=". $id;

$cat = new Category();
if(!$cat->get($id))
	redirect($backlink);

if ($cat->deletable($cat->ID)){
	$cat->delete();
}

redirect($backlink);